import java.util.HashSet;
import java.util.Iterator;

/**
 * @author ypz
 * @date 2021/9/15 10:49
 */
public class HashSetKnow {
    public static void main(String[] args) {
        HashSet<String> hash = new HashSet<>();
        hash.add("zhangsan");
        hash.add("zhangsan");
        Iterator<String> iterator = hash.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
